include build-scripts/macro.mk


# ------------- LOCAL_REPO_PATHS ------------- #
define env-local-repo-projects
ifneq ($$(LOCAL_REPO_PROJECTS),)
$$(foreach n,$$(LOCAL_REPO_PROJECTS),$$(eval $$(call macro-target,$$(n),$(1))))
else
PROJECTS=$$(shell repo list -p)
$$(foreach n,$$(PROJECTS),$$(eval $$(call macro-target,$$(n),$(1))))
endif
endef
# ------------- LOCAL_REPO_NAMES ------------- #
define env-local-repo-paths
ifneq ($$(LOCAL_REPO_NAMES),)
$$(foreach n,$$(LOCAL_REPO_NAMES),$$(eval $$(call macro-target,$$(n),$(1))))
else
NAMES=$$(shell repo forall -c pwd)
$$(foreach n,$$(NAMES),$$(eval $$(call macro-target,$$(n),$(1))))
endif
endef
# ------------- LOCAL_REPO_PATHS ------------- #
define env-local-repo-paths
ifneq ($$(LOCAL_REPO_PATHS),)
$$(foreach n,$$(LOCAL_REPO_PATHS),$$(eval $$(call macro-target,$$(n),$(1))))
else
PATHS=$$(shell repo forall -c pwd)
$$(foreach n,$$(PATHS),$$(eval $$(call macro-target,$$(n),$(1))))
endif
endef

